﻿<Window x:Class="Wallace.IDE.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:localUI="clr-namespace:Wallace.IDE.Framework.UI"
        WindowStartupLocation="CenterScreen"
        Title="Walli" 
        Icon="AppIcon.ico"
        Height="670" 
        Width="875"
        MinWidth="300"
        MinHeight="200"
        ResizeMode="CanResizeWithGrip"
        Style="{StaticResource ChromeWindowStyle}"
        Background="{StaticResource CaptionBackgroundBrush}">

    <Grid x:Name="gridMain">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="300" MinWidth="10" />
            <ColumnDefinition Width="*" MinWidth="100" />
        </Grid.ColumnDefinitions>
        
        <!-- ******************* 
             Main Menu 
             ******************* -->
        <Menu x:Name="menuMain"
              Grid.Row="0"
              Grid.Column="0"
              Grid.ColumnSpan="2"
              Style="{StaticResource ChromeMenuStyle}">
        </Menu>

        <!-- ******************* 
             Main Toolbar 
             ******************* -->
        <ToolBar x:Name="toolBarMain"
                 Grid.Row="1"
                 Grid.Column="0"
                 Grid.ColumnSpan="2"
                 Background="White"
                 ToolBarTray.IsLocked="True">
        </ToolBar>

        <!-- ******************* 
             Navigation container
             ******************* -->
        <DockPanel x:Name="dockPanelNavigation"
                   Grid.Row="3"
                   Grid.Column="0"
                   Margin="6,0,0,0"
                   LastChildFill="True">
            
            <Border x:Name="borderNavigation"
                    DockPanel.Dock="Top"
                    Background="{StaticResource ButtonHotTrackBackgroundBrush}"
                    BorderThickness="1,1,1,0"
                    BorderBrush="Gray">
                <DockPanel LastChildFill="True">
                    <Button x:Name="buttonHideNavigation"
                            DockPanel.Dock="Right"
                            Click="buttonHideNavigation_Click"/>                    
                    <TextBlock x:Name="textBlockTitle"
                               VerticalAlignment="Center" 
                               Padding="2"/>
                </DockPanel>
            </Border>

            <!-- ******************* 
             Project navigation view 
             ******************* -->
            <TabControl x:Name="nodesTabTree"
                        TabStripPlacement="Bottom"
                        localUI:ChromeTab.ShowOverflowButton="False"
                        Style="{StaticResource ChromeTabControlStyle}" />

        </DockPanel>        

        <!-- ******************* 
             Grid splitter
             ******************* -->
        <GridSplitter x:Name="gridSplitterMain"
                      Grid.Row="2"
                      Grid.RowSpan="2"
                      Grid.Column="1"
                      Background="White"
                      Margin="0,5,0,0"
                      HorizontalAlignment="Left"
                      VerticalAlignment="Stretch"
                      Width="5" />

        <!-- Upgrade notice -->
        <localUI:UpdateNoticeControl x:Name="updateNotice"
                                     Grid.Row="2"
                                     Grid.RowSpan="2"
                                     Grid.Column="0"
                                     Grid.ColumnSpan="3"
                                     Visibility="Collapsed" />
        
        <!-- ******************* 
             Documents tab control
             ******************* -->
        <TabControl x:Name="documentsTabControl"
                    Grid.Row="2"
                    Grid.Column="1"
                    Grid.RowSpan="2"
                    Margin="5, 0, 6, 0">
            
            <TabControl.Style>
                <Style TargetType="{x:Type TabControl}" BasedOn="{StaticResource ChromeTabControlStyle}">
                    <Setter Property="Visibility" Value="Visible" />
                    <Style.Triggers>
                        <Trigger Property="HasItems" Value="False">
                            <Setter Property="Visibility" Value="Hidden" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </TabControl.Style>
        </TabControl>

        <!-- ******************* 
             Status bar
             ******************* -->
        <StatusBar Grid.Row="4"
                   Grid.Column="0"
                   Grid.ColumnSpan="2"
                   Background="White"                   
                   Padding="6, 3, 6, 6">
            <StatusBarItem>
                <TextBlock x:Name="statusText" />
            </StatusBarItem>
        </StatusBar>
        
    </Grid>
</Window>
